1. Field of the Invention
The present invention relates to an image forming apparatus, a method for controlling the same, and a storage medium.
2. Description of the Related Art
A description will be given of a conventional image formation process. An image forming apparatus that interprets print data such as page description language (hereinafter referred to as “PDL”) data to thereby generate bitmap data for image formation has been proposed. Firstly, the image forming apparatus performs interpretation processing for interpreting PDL data. Next, the image forming apparatus performs graphic processing for a rendering command in PDL data based on the result of the interpretation processing for PDL data.
Graphic processing is processing for converting a high-level rendering command in PDL data into a simple fill rendering command or the like. Next, the image forming apparatus generates intermediate data called a display list (DL) based on the post-graphic processing rendering command. Then, the image forming apparatus executes processing for generating bitmap data for image formation, which is called rendering, based on intermediate data. For example, Japanese Patent Laid-Open No. 2004-268553 discloses a printing apparatus that interprets an intermediate language and outputs a raster image and an attribute bit as image data to thereby realize high image-quality print output using the output attribute bit.
Next, a description will be given of a conventional VDP technology. A VDP technology such as PPML for defining reusable data in a specification of PDL data format has been proposed. PPML data can enclose other PDL data as content data in PDL data. Examples of PDL data that can be enclosed in PPML data includes PDL data required for high-level graphic processing such as PostScript® or PDF.
PostScript® and PDF have a high-level rendering command such as a pattern rendering command (e.g., pattern dictionary) which enables repetition rendering. Also, PostScript® and PDF have physical pixel space aware stroke rendering processing. For example, as physical pixel space aware stroke rendering processing, PostScript® and PDF have a command for realizing high image-quality rendering represented by Automatic Stroke Adjustment. Furthermore, PPML data can also enclose raster image data such as TIFF.
The image forming apparatus (printer) can perform PDL data interpretation processing taking advantage of the explicit fact that whether or not the enclosed PDL data is reusable data to thereby cache reusable data subjected to graphic processing.
A printer reuses and arranges the cached reusable data (cache data) on the planes of different paper sheets. With this arrangement, a printer can perform interpretation processing for PDL data enclosing reusable data for pattern rendering. Furthermore, a printer can reduce the time elapsed until intermediate data is generated by performing graphic processing for a rendering command in PDL data or the time elapsed until bitmap data for image formation is generated (rendering processing). For example, Japanese Patent Laid-Open No. 2010-173236 discloses an image forming apparatus that reuses object data such as variable data.
Next, a description will be given of PostScript®. There is no definition of a method for installing PostScript®. However, summary of the algorithm of interpretation processing, graphic processing, and rendering processing for PDL data is defined as a predetermined specification. Here, a placement location for placement of a rendering command on a logical space depends on the rendering result on a physical pixel space. The reasons will be described below.
PostScript language has a function that controls a device for outputting a raster bitmap such as a printer or the like. The device which is capable of outputting a raster bitmap on a visible medium determines the color of a cell in a discrete device space, which is a set of pixels, in accordance with PostScript data. The device determines the color of a raster bitmap to thereby realize the formation of a visible image rendered by a character rendering command, stroke, a fill rendering command, a raster bitmap rendering command, or the like described in PostScript data.
In order to form a raster bitmap in accordance with the specification of PostScript, a printer that interprets PostScript so as to form an image needs to convert abstract information not into color information on a raster bitmap but into information having a low degree of abstraction. Abstract information includes a character rendering command, stroke, a fill rendering command, a raster bitmap rendering command, or the like. These rendering commands have information about a logical coordinate system independent of a device space.
Since a rendering command is a logical coordinate system, the rendering command can have three types of information: (1) continuous (indiscrete) coordinate information, (2) a rendering command involving an arithmetic operation for determining a rendering position, (3) a rendering command needing the stored procedure to determine rendering content. In order to convert these information into a device space, a printer uses a scanning converter. The scanning converter converts each rendering command into a frame buffer or discrete information on a display list (DL) in accordance with the result of interpretation of the rendering command. For example, when the scanning converter receives graphics such as a circle, the scanning converter determines whether or not each pixel lies outside or inside the specified range of the rendering command. The scanning converter determines color information about each pixel based on the determination result.
Next, a description will be given of graphic processing in PostScript. Examples of rendering commands in PostScript mainly includes as follows:
FillTo fill the specified regionStrokeTo render a lineImageTo render a raster bitmapShowTo render a glyph (visible shape ofcharacter information)
Furthermore, one of rendering commands for designating color information includes as follows:
Make patternTo generate pattern
The printer performs graphic processing for the rendering commands and then performs rendering processing to thereby obtain the rendering result. A path construction algorithm is processing corresponding to graphic processing. The rendering commands such as fill, stroke, or show render a current path using parameters in the rendering commands. The path is configured by segments and curves describing graphics and its position. Segments and curves are obtained by continuously executing a path construction command. For example, the path construction command is realized by commands such as newpath, moveto, lineto, curveto, arc, closepath, and the like.
The printer renders the rendering commands by repeating the following processing (a) to (c) while using the current path obtained in accordance with the path construction command:
(a) Data interpretation is executed in accordance with the language specification in PostScript.
(b) Current path is constructed by executing the path construction command.
(c) Drawing command is executed.
Next, a description will be given of rendering processing as mapping processing for mapping data to a device coordinate. In order to obtain the rendering result, a printer needs to convert a logical space having a high degree of abstraction in a rendering command to a device space during interpretation of the rendering command described above. This process is classified into rendering processing.
A device space to be subjected to rendering processing is based on a set of color information associated with discrete information called a plurality of pixels. On the other hand, information on a logical space described in a rendering command maintains a description independent of individual equipment such as a printer by being independent of a device space. In other words, a rendering command on a logical space is information which is not constrained by its unit or a position on any grid. Thus, PostScript data can freely specify a rendering position by using an arithmetic operation on a logical space independent of a device space.
For example, examples of commands for performing an arithmetic operation for designating a position include commands such as translate, rotate, scale, and the like. The printer converts information on such an abstract logical space into information on a device space in accordance with a current conversion matrix. The printer performs linear conversion for each rendering command using a current conversion matrix, and thus, continuous positional information on a device space can be obtained. Also, a printer further converts positional information on a device space into discrete information to thereby obtain a set of color information associated with discrete information called a plurality of pixels. Rules for converting positional information on a device space into discrete information are the scan conversion rules.
The scan conversion rules in PostScript have the following definition. Coordinates and pixels are expressed by a device space. Graphics refers to a path to be rendered by a current color or image. A path coordinate values is mapped to a device space. During mapping processing, the path coordinate value is not rounded at the boundary of a device pixel. The aforementioned processing is computed based on continuous spatial information.
However, a rendering command is finally converted into discrete information on a device space and is arranged on a pixel. A pixel is a minimum square region constituting a device space. Thus, according to the definition of PostScript, discrete information has coordinate information as follows. For example, when continuous coordinate information about a device coordinate system is (x, y), discrete coordinate information (i, j) is defined as follows:(i, j)=(floor(x), floor(y))
Here, when regions that belong to the pixel are defined as a set of pixels (x′, y′), the following relationships are satisfied: i≦x′<i+1 and j≦y′<j+1. In addition to such definition, PostScript has the following scan conversion rules. In other words, in accordance with the definition of PostScript, the following processing is executed for the pixel on the coordinate regardless of the position on the pixel if continuous coordinate information falls within the range of pixel coordinates in accordance with the definition. In other words, in accordance with the definition of PostScript, a printer maps color information in accordance with a rendering command to the pixel. Such rules are generally referred to as “pixel placement rule”.
Next, a description will be given of Automatic Stroke Adjustment processing. In PostScript, a rendering definition for a stroke rendering command is further present. When a path is very thin line on a raster bitmap obtained as a result of rendering processing, it may be seen that a line width is not uniform. In accordance with the aforementioned scan conversion rules, a line width varies depending on the position on a device space. In other words, the number of discrete pixels intersecting a line varies depending on the position on a device space.
In order to obtain a more preferable rendering result, PostScript has the following definition. In other words, processing for making a line width uniform by correcting the rendering result obtained by rendering processing is defined. During the aforementioned processing, the following Automatic Stroke Adjustment processing needs to be performed by taking into account continuous coordinate values of a stroke rendering command and the position in a discrete device space.
In other words, Automatic Stroke Adjustment processing is processing for adjusting a line width and its end point such that the maximum error is lower than ½ pixel. Furthermore, when a line width after being converted on a device space is lower than ½ pixel, the line width is corrected so as to be one pixel width by Automatic Stroke Adjustment processing.
As described above, for the rendering command of PostScript, positional information is converted using a current conversion matrix in a discrete device space. Furthermore, it has a nature that which pixel to be filled cannot be determined until pixel placement rules depending on pixels in a discrete space are applied.
It should be noted that Automatic Stroke Adjustment processing can be switched between enabled and disabled states by a set stroke adjustment command. An argument of the set stroke adjustment command is a logical type.
The rendering position of PDL data which can enclose PostScript such as PPML or the like is determined after PostScript interpretation processing performed by a printer. However, as in the aforementioned stroke rendering processing, PostScript rendering processing is a rendering depending on the mapping between a user space and a device space during interpretation of PostScript. In other words, in accordance with the specification of PostScript, a printer needs to perform rendering in a space independent of a PPML rendering space.
Next, a description will be given of a pattern rendering command. The pattern rendering command in PostScript is a repetition rendering command for repeatedly rendering small graphics called pattern cells. Thus, in order to perform rendering based on the pattern rendering command, a printer needs to execute processes such as construction of the rendering of pattern cells, specification of a region, rendering by spreading pattern cells, or the like.
The rendering state of cells can be defined by a PaintProc command. The pattern rendering command can be defined by registering the PaintProc command in a Tilling Pattern dictionary. When a make pattern command is executed for the Tilling Pattern dictionary, a printer performs pattern rendering processing in a pattern coordinate system.
The pattern coordinate system depends on a current conversion matrix and matrix parameters upon execution of the make pattern command. Thus, the pattern coordinate system is fixed to a user coordinate system upon execution of the make pattern command. In other words, the size and the shape of a pattern cell are rendered in a coordinate system independent of a current conversion matrix or the like. Thus, a cell spreading method depends on rendering at a position on a virtual paper plane called a user space.
The rendering position of PDL data which can enclose PostScript such as PPML or the like is determined after PostScript interpretation processing. However, pattern rendering is rendering depending on a user space during interpretation of PostScript. In other words, in accordance with the specification of PostScript, a printer needs to perform rendering in a space independent of a PPML rendering space.
However, in the conventional VDP technology, there is no cache method depending on the feature of the enclosed PDL data. Thus, print processing satisfying both high quality and high speed printing cannot be realized. For example, the pattern rendering command (pattern dictionary) for PostScript® and PDF depends on the rendering position on a paper plane.
In other words, the pattern rendering command determines whether or not rendering is repeated from which position depending on the rendering position on a paper plane. In such a prior art, cache data is stored as raster bitmap data or post-PDL data interpretation processing intermediate data. In any cache data storing method, the rendering result depending on PDL data interpretation during caching is cached. Thus, when a printer performs rendering at different positions upon reuse of cache data, the printer cannot determine whether or not rendering is repeated by starting from which position in consideration of a correct rendering position on a paper plane. In other words, rendering deficiencies may occur.
For the Automatic Stroke Adjustment function in PostScript® and PDF, determining which pixel to be subjected to rendering depends on the position of a physical coordinate space to be subjected to rendering. In other words, the Automatic Stroke Adjustment function determines rendering pixels to be rendered by line rendering depending on the fact that line rendering is performed at which position on a discrete space in which the rendering result is rendered.
However, in the cache data storing method stated above, the rendering result depending on PDL data interpretation during caching is cached. Thus, when a printer performs rendering at different positions upon reuse of cache data, the printer cannot determine whether or not rendering is repeated by starting from which position depending on a rendering position on a paper plane. Consequently, it is difficult to execute rendering in a proper manner.
In other words, in the prior art, when high speed image formation processing is attempted to be realized using cache data which is readily converted into intermediate data, rendering deficiencies may occur. Also, when information independent of the position in a physical coordinate space is cached so as not to occur rendering deficiencies, graphic processing is required upon reuse of cache data. Consequently, it is difficult to reuse cache data at high speed.